// Copyright Leonid Shlyapnikov 2010
// Distributed under the GNU Lesser General Public License http://www.gnu.org/licenses/lgpl.html
//    author: Leonid Shlyapnikov, created on: May 3, 2009

#ifndef FIXPARSER_CPP_SRC_MAIN_FIXPARSER_LOG_H_
#define FIXPARSER_CPP_SRC_MAIN_FIXPARSER_LOG_H_

#include <iostream> // NOLINT

namespace fixparser {

//#define FIXSTOKER_LOG_DEBUG
#define FIXSTOKER_LOG_INFO
#define FIXSTOKER_LOG_WARN
#define FIXSTOKER_LOG_ERROR

// LOGGING MACROS DEFINITITIONS

// LOG_DEBUG
#ifdef FIXSTOKER_LOG_DEBUG
#define LOG_DEBUG(msg) std::cout << "DEBUG [" << __FILE__ << ":" << __LINE__ << "] " << msg << std::endl; // NOLINT
#endif

#ifndef FIXSTOKER_LOG_DEBUG
#define LOG_DEBUG(msg)
#endif

// LOG_INFO
#ifdef FIXSTOKER_LOG_INFO
#define LOG_INFO(msg) std::cout << "INFO  [" << __FILE__ << ":" << __LINE__ << "] " << msg << std::endl; // NOLINT
#endif

#ifndef FIXSTOKER_LOG_INFO
#define LOG_INFO(msg)
#endif

// LOG_WARN
#ifdef FIXSTOKER_LOG_WARN
#define LOG_WARN(msg) std::cout << "WARN  [" << __FILE__ << ":" << __LINE__ << "] " << msg << std::endl; // NOLINT
#endif

#ifndef FIXSTOKER_LOG_WARN
#define LOG_WARN(msg)
#endif

// LOG_ERROR
#ifdef FIXSTOKER_LOG_ERROR
#define LOG_ERROR(msg) std::cout << "ERROR [" << __FILE__ << ":" << __LINE__ << "] " << msg << std::endl; // NOLINT
#endif

#ifndef FIXSTOKER_LOG_ERROR
#define LOG_ERROR(msg)
#endif

}

#endif  // FIXPARSER_CPP_SRC_MAIN_FIXPARSER_LOG_H_
